package com.cbitedu.springboot.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration//保证该类会被扫描到
@PropertySource("classpath:config/customconfig.properties")  //定义了要读取的properties文件的位置
@ConfigurationProperties(prefix = "config")//读取前缀为config 的内容
public class CustomProperties {
    private String picPath;

    @Override
    public String toString() {
        return "CustomProperties{" +
                "picPath='" + picPath + '\'' +
                ", videoPath='" + videoPath + '\'' +
                ", serverDomain='" + serverDomain + '\'' +
                '}';
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    public String getVideoPath() {
        return videoPath;
    }

    public void setVideoPath(String videoPath) {
        this.videoPath = videoPath;
    }

    public String getServerDomain() {
        return serverDomain;
    }

    public void setServerDomain(String serverDomain) {
        this.serverDomain = serverDomain;
    }

    private String videoPath;
    private String serverDomain;
}
